package oo5;

public class Student {
	private String no, name;
	private int age;
	private final String sex;// 必须在构造方法中赋值

	public Student(String no, String name, int age, String sex) {
		super();
		this.no = no;
		this.name = name;
		this.age = age;
		this.sex = sex;
	}

	public Student(String name) {
		sex = "男";
		this.name = name;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getSex() {
		return sex;
	}

//	public void setSex(String s) {
//		sex = s;
//	}

}
